package com.lwm.springcloud.config;

import org.springframework.cloud.client.loadbalancer.LoadBalanced;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.client.RestTemplate;

/**
 * @author lwmzzz
 * @version 1.0
 * @date 2020/11/24 0:14
 * @description
 */
@Configuration
public class ApplicationContextConfig {
    @Bean
//    @LoadBalanced
    //赋予restTemplate负载均衡的能力
    public RestTemplate getRestTemplate(){
        return new RestTemplate();
    }
}
